<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>_.sortBy()</title>
</head>
<body>


    <script type="text/javascript" src="js/lodash.js"></script>
    <script type="text/javascript">
        var users = [
          { 'user': 'fred',   'age': 48 ,"sex":"男"},
          { 'user': 'barney', 'age': 36 ,"sex":"男"},
          { 'user': 'fred',   'age': 42 ,"sex":"女"},
          { 'user': 'barney', 'age': 34 ,"sex":"男"}
        ];
        var newArr=_.map(_.sortByAll(users, ['age',"sex" ]), _.values);
        console.log(newArr)

    </script>
    
</body>
</html>